export default [
  {
    name: "测试节点集",
    children: [
      {
        // UI 数据
        name: "ADD",
        type: "model.add",
        selected: false,
        // 业务数据
        inArr: [
          { paramName: "add1", paramType: "number" },
          { paramName: "add2", paramType: "number" },
        ],
        outArr: [{ paramName: "sum", paramType: "number" }],
      },
      {
        // UI 数据
        name: "CONSTANT",
        description: "常数节点",
        type: "model.constant",
        selected: false,
        // 业务数据
        inArr: [],
        outArr: [{ paramName: "out", paramType: "number" }],
        initParams: [
          {
            paramName: "value",
            paramType: "number|array[number]",
            paramRes: 1,
            display: {
              type: "input",
            },
          },
          // {
          //   paramName: "selected",
          //   paramType: "string",
          //   paramRes: undefined,
          //   display: {
          //     type: "select",
          //     options: [
          //       {
          //         label: "选项1",
          //         value: "select1",
          //       },
          //       {
          //         label: "选项2",
          //         value: "select2",
          //       },
          //     ],
          //   },
          // },
        ],
      },
    ],
  },
  {
    name: "子模块",
    children: [
      {
        name: "IN",
        type: "port.in",
        description: "输入端口",
        selected: false,
        inArr: [],
        outArr: [{ paramName: "OUT" }],
      },
      {
        name: "OUT",
        type: "port.out",
        description: "输出端口",
        selected: false,
        inArr: [{ paramName: "IN" }],
        outArr: [],
      },
      // todo: 对于子模块，后续将它的 inArr 和 outArr 处理成自动的
      {
        name: "子系统",
        type: "subsystem.system",
        selected: false,
        inArr: [],
        outArr: [],
        isGroup: true,
        kids: [],
      },
      {
        name: "RK4",
        type: "func.rk4",
        selected: false,
        inArr: [
          { paramName: "cur_s", paramType: "number|array" },
          { paramName: "step", paramType: "number" },
        ],
        outArr: [{ paramName: "next_s", paramType: "number|array" }],
        isGroup: true,
        kids: [],
      },
    ],
  },
  {
    name: "数学源模块",
    children: [
      {
        name: "add",
        type: "math.add",
        description: "加法",
        selected: false,
        inArr: [
          { paramName: "x1", paramType: "number" },
          { paramName: "x2", paramType: "number" },
        ],
        outArr: [{ paramName: "sum", paramType: "number" }],
      },
      {
        name: "subtract",
        type: "math.subtract",
        description: "减法",
        selected: false,
        inArr: [
          { paramName: "x1", paramType: "number" },
          { paramName: "x2", paramType: "number" },
        ],
        outArr: [{ paramName: "bias", paramType: "number" }],
      },
      {
        name: "multiply",
        type: "math.multiply",
        description: "乘法",
        selected: false,
        inArr: [
          { paramName: "x1", paramType: "number" },
          { paramName: "x2", paramType: "number" },
        ],
        outArr: [{ paramName: "acc", paramType: "number" }],
      },
      {
        name: "divide",
        type: "math.divide",
        description: "除法",
        selected: false,
        inArr: [
          { paramName: "x1", paramType: "number" },
          { paramName: "x2", paramType: "number" },
        ],
        outArr: [{ paramName: "quo", paramType: "number" }],
      },
    ],
  },
  {
    name: "控制节点",
    children: [
      {
        // UI 数据
        name: "IF",
        type: "control.if",
        selected: false,
        // 业务数据
        inArr: [{ paramName: "in", paramType: "any" }],
        outArr: [
          { paramName: "yes", paramType: "any" },
          { paramName: "no", paramType: "any" },
        ],
      },
      {
        // UI 数据
        name: "DEFAULT",
        type: "control.default",
        selected: false,
        // 业务数据
        inArr: [
          { paramName: "default", paramType: "any" },
          { paramName: "feedback", paramType: "any" },
        ],
        outArr: [{ paramName: "out", paramType: "any" }],
      },
    ],
  },
];
